package com.caigou.bean.param;


import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.util.List;

@Data
@ApiModel(description = "搜索标讯信息实体")
public class EsBidParam {


    @JsonIgnore
    private String id;//es集群中标讯主键


    //页码，第几页，默认第0页
    @ApiModelProperty(value = "分页页数 默认为0", name = "pageNum", required = false, example = "0")
    private Integer pageNum = 0;
    
    //每页标讯信息个数，默认10条
    @ApiModelProperty(value = "分页条数 默认为10", name = "pageSize", required = false, example = "10")
    private Integer pageSize = 10;

    //query查询关键字
    @ApiModelProperty(value = "query查询关键字(全文搜索、内容搜索)", name = "queryText", required = true, example = "公告")
    private String queryText;
    
    //采购方式
    @ApiModelProperty(value = "采购方式", name = "purchaseTypeNameList", required = false, example = "[\"公开招标\",\"竞争性谈判\"]")
    private List<String> purchaseTypeNameList;
    
    //公告类型
    @ApiModelProperty(value = "公告类型", name = "announcementTypeNameList", required = false, example = "[招标公告]")
    private List<String> announcementTypeNameList;

    @JsonIgnore
    private String purchaser;//
    
    //开始时间
    @ApiModelProperty(value = "开始时间", name = "startTime", required = false, example = "2017-11-29 00:00:00")
    private String startTime;
    //结束时间
    @ApiModelProperty(value = "结束时间", name = "endTime", required = false, example = "2020-02-05 12:45:44")
    private String endTime;
    
    //标的最低金额
    @Min(value = 0,message = "金额超过最小限额")
    @Max(value = 99999999000000L,message = "金额超出最大限额")
    @ApiModelProperty(value = "标的最低金额", name = "lowBidMoney", required = false, example = "100")
    private Long lowBidMoney;
    //标的最高金额
    @ApiModelProperty(value = "标的最高金额", name = "highBidMoney", required = false, example = "600000000")
    @Min(value = 0,message = "金额超过最小限额")
    @Max(value = 99999999000000L,message = "金额超出最大限额")
    private Long highBidMoney;

    @ApiModelProperty(value = "省、市、地区列表", name = "regionList", required = false, example = "[{\"regionCode\":\"130000\",\"regionName\":\"河北省\",\"regionLevel\": 1}]")
    private List<RegionParam> regionList;
    
//    //地区
//    private String province;
//    private String city;
//    private String town;
    
    //二级品目编码
    //@JsonIgnore
    @ApiModelProperty(value = "二级品目编码", name = "level2ItemCodeList", required = false, example = "[A06]")
    private List<String> level2ItemCodeList;
    
    
    //排序方式，默认2，1相似度排序；2时间排序；3标的金额排序；4预算金额排序；5id倒序
    @ApiModelProperty(value = "排序方式，默认2，1相似度排序；2时间排序；3标的金额排序；4预算金额排序；5id倒序", name = "sort", required = false, example = "1")
    private Integer sort = 2;


    //排序方式，默认2，1相似度排序；2时间排序；3标的金额排序；4预算金额排序；5id倒序
    @ApiModelProperty(value = "品目类型，默认 1(普通打的品目标签) 2(语义分析打的品目标签)", name = "itemType", required = false, example = "1")
    private Integer itemType = 2;

    @ApiModelProperty(value = "推送时间", name = "pushTime", required = false, example = "yyyy-MM-dd")
    private String pushTime;

    @ApiModelProperty(value = "上次推送时间", name = "pushTime", required = false, example = "yyyy-MM-dd HH:mm:ss")
    private String startPushTime;

    @ApiModelProperty(value = "本次推送时间", name = "pushTime", required = false, example = "yyyy-MM-dd HH:mm:ss")
    private String endPushTime;

    private Integer searchType;//1标题搜索  2全文搜索

}
